package ThreadDemo.BlockingQueue;

import java.util.concurrent.ArrayBlockingQueue;

public class Test {
    public static void main(String[] args) {
        // 创建一个阻塞队列
        ArrayBlockingQueue<String> bq = new ArrayBlockingQueue<>(1);

        // 创建线程并开启
        Cooker c = new Cooker(bq);
        Foodie f = new Foodie(bq);

        c.start();
        f.start();
    }
}
